﻿package mortal.game.view.forging.renderer
{
    import com.mui.controls.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.game.manager.*;
    import mortal.game.view.common.*;
    import mortal.game.view.forging.data.*;

    public class EquipQualAdvanceAttrCellRenderer extends GCellRenderer
    {
        private var _attrName:GTextFiled;
        private var _attrBaseValue:GTextFiled;
        private var _attrAddValue:GTextFiled;
        private var _attrData:EquipQualAttrData;

        public function EquipQualAdvanceAttrCellRenderer()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._attrName = UIFactory.gTextField("", 2, -1, 43, 20, this);
            this._attrBaseValue = UIFactory.gTextField("", 49 - 2, -1, 50, 20, this, GlobalStyle.textFormatBai);
            this._attrAddValue = UIFactory.gTextField("", 127 + 2 - 25, -1, 55, 20, this, GlobalStyle.textFormatLv);
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._attrData = param1 as EquipQualAttrData;
            if (this._attrData)
            {
                this._attrName.text = this._attrData.attrName;
                this._attrBaseValue.text = "+" + this._attrData.attrBaseValue;
                this._attrAddValue.text = "+" + this._attrData.addValue;
            }
            return;
        }// end function

        public function addTextEffect() : void
        {
            var _loc_1:Array = [FilterConst.colorGlowFilter(GlobalStyle.colorLvUint)];
            var _loc_2:Array = [FilterConst.colorGlowFilter(GlobalStyle.colorBaiUint)];
            EffectManager.glowFilterUnReg(this._attrBaseValue);
            EffectManager.glowFilterReg(this._attrBaseValue, _loc_2, 1, 10, 0, 3);
            EffectManager.glowFilterUnReg(this._attrAddValue);
            EffectManager.glowFilterReg(this._attrAddValue, _loc_1, 1, 10, 0, 3);
            return;
        }// end function

        public function stopTextEffect() : void
        {
            EffectManager.glowFilterUnReg(this._attrAddValue);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._attrName.dispose();
            this._attrName = null;
            this._attrBaseValue.dispose();
            this._attrBaseValue = null;
            this._attrAddValue.dispose();
            this._attrAddValue = null;
            this._attrData = null;
            return;
        }// end function

    }
}
